home *** CD-ROM | disk | FTP | other *** search
- on mouseDown
- global gCurrentPosC, gNbItemC
- set Delta to the mouseV - the locV of sprite 20
- set TempV to the mouseV - Delta
- set TempV2 to the mouseV
- set CurrentP to getAt(gCurrentPosC, 2)
- repeat while the mouseDown
- if rollOver(19) and (TempV2 <> the mouseV) then
- set TempV to the mouseV - Delta
- set TempV2 to the mouseV
- if TempV > (SpriteBottom(19) - (SpriteHeight(20) / 2)) then
- set the locV of sprite 20 to SpriteBottom(19) - (SpriteHeight(20) / 2)
- else
- if TempV < (SpriteTop(19) + (SpriteHeight(20) / 2)) then
- set the locV of sprite 20 to SpriteTop(19) + (SpriteHeight(20) / 2)
- else
- set the locV of sprite 20 to TempV
- end if
- end if
- updateStage()
- set Percent to (the locV of sprite 20 - SpriteTop(19) - (SpriteHeight(20) / 2)) / ((SpriteHeight(19) - SpriteHeight(20)) * 1.0)
- if Percent >= 1 then
- setAt(gCurrentPosC, 2, getAt(gNbItemC, 2) - 20)
- else
- if Percent = 0 then
- setAt(gCurrentPosC, 2, 1)
- else
- setAt(gCurrentPosC, 2, integer(Percent * (getAt(gNbItemC, 2) - 21)) + 1)
- end if
- end if
- if getAt(gCurrentPosC, 2) <> CurrentP then
- set CurrentP to getAt(gCurrentPosC, 2)
- SetWinContenu2(2, 14)
- end if
- end if
- end repeat
- ActiveFieldC(2)
- end
-